package com.lxmes.pm.service.impl;

import java.util.List;
import com.lxmes.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lxmes.pm.mapper.AKyTeamMapper;
import com.lxmes.pm.domain.AKyTeam;
import com.lxmes.pm.service.IAKyTeamService;

/**
 * 科研团队Service业务层处理
 * 
 * @author zhangzhiyu
 * @date 2023-04-04
 */
@Service
public class AKyTeamServiceImpl implements IAKyTeamService 
{
    @Autowired
    private AKyTeamMapper aKyTeamMapper;

    /**
     * 查询科研团队
     * 
     * @param id 科研团队主键
     * @return 科研团队
     */
    @Override
    public AKyTeam selectAKyTeamById(Long id)
    {
        return aKyTeamMapper.selectAKyTeamById(id);
    }

    /**
     * 查询科研团队列表
     * 
     * @param aKyTeam 科研团队
     * @return 科研团队
     */
    @Override
    public List<AKyTeam> selectAKyTeamList(AKyTeam aKyTeam)
    {
        return aKyTeamMapper.selectAKyTeamList(aKyTeam);
    }

    /**
     * 新增科研团队
     * 
     * @param aKyTeam 科研团队
     * @return 结果
     */
    @Override
    public int insertAKyTeam(AKyTeam aKyTeam)
    {
        aKyTeam.setCreateTime(DateUtils.getNowDate());
        return aKyTeamMapper.insertAKyTeam(aKyTeam);
    }

    /**
     * 修改科研团队
     * 
     * @param aKyTeam 科研团队
     * @return 结果
     */
    @Override
    public int updateAKyTeam(AKyTeam aKyTeam)
    {
        aKyTeam.setUpdateTime(DateUtils.getNowDate());
        return aKyTeamMapper.updateAKyTeam(aKyTeam);
    }

    /**
     * 批量删除科研团队
     * 
     * @param ids 需要删除的科研团队主键
     * @return 结果
     */
    @Override
    public int deleteAKyTeamByIds(Long[] ids)
    {
        return aKyTeamMapper.deleteAKyTeamByIds(ids);
    }

    /**
     * 删除科研团队信息
     * 
     * @param id 科研团队主键
     * @return 结果
     */
    @Override
    public int deleteAKyTeamById(Long id)
    {
        return aKyTeamMapper.deleteAKyTeamById(id);
    }
}
